﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CSharpStrengthenTeach
{
    public class Doctor : NewPerson
    {
        public override void Play()
        {
            Console.WriteLine("医生下课后，去打羽毛球了");
        }

        /// <summary>
        /// 这个是对虚方法的重写
        /// </summary>
        public override void Listen()
        {
            base.Listen(); //还可以调用父类虚方法的实现

            Console.WriteLine("我还喜欢听古典音乐");
        }

        public new void Dowork()
        {
            Console.WriteLine("每天都要工作");
        }
    }
}
